﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EduseKiosk
{
    public partial class LeftBarThumbnails : UserControl
    {
        public LeftBarThumbnails()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FormEduseKiosk form = FormEduseKiosk.Instance;

            Visible = false;
            form.LeftBarHidden.Visible = true;
            form.PanelView.Enabled = true;
        }

        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listView1.SelectedIndices.Count == 0)
                return;

            FormEduseKiosk form = FormEduseKiosk.Instance;

            switch (listView1.SelectedIndices[0])
            {
                case 0:
                    form.SwitchToView(new ExamplePage());
                    break;
                case 1:
                    form.SwitchToView(new ExampleSolutionPage());
                    break;
                case 2:
                    form.SwitchToView(new ExamplePage2());
                    break;
                case 3:
                    form.SwitchToView(new ExampleSolutionPage2());
                    break;
                case 4:
                    form.SwitchToView(new ExamplePage3());
                    break;
                case 5:
                    form.SwitchToView(new ExampleSolutionPage3());
                    break;
                case 6:
                    form.SwitchToView(new ExampleSolutionPage3_2());
                    break;
                case 7:
                    form.SwitchToView(new NewQuestionPage());
                    break;
                case 8:
                    form.SwitchToView(new NewAnswerPage());
                    break;
                case 9:
                    form.SwitchToView(new PrinciplePage1());
                    break;
                case 10:
                    form.SwitchToView(new FormulaPage1());
                    break;
                case 11:
                    form.SwitchToView(new FormulaPage2());
                    break;
            }
        }
    }
}
